package com.mettle.loyaltycard.model;

public class Customer {

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((loyaltyCard == null) ? 0 : loyaltyCard.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Customer other = (Customer) obj;
		if (loyaltyCard == null) {
			if (other.loyaltyCard != null)
				return false;
		} else if (!loyaltyCard.equals(other.loyaltyCard))
			return false;
		return true;
	}

	private String name;
	private String email;
	private LoyaltyCard loyaltyCard;

	public LoyaltyCard getLoyaltyCard() {
		return loyaltyCard;
	}

	public void setLoyaltyCard(LoyaltyCard loyaltyCard) {
		this.loyaltyCard = loyaltyCard;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
